<?php /*a:3:{s:41:"D:\myweb\lemocms\view\admin\link\add.html";i:1569314347;s:46:"D:\myweb\lemocms\view\admin\common\header.html";i:1569314347;s:46:"D:\myweb\lemocms\view\admin\common\footer.html";i:1569314347;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo config('admin.sys_name'); ?>后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
    <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style id="LM-bg-color">
    </style>
</head>
<div class="LM-container">
    <div class="LM-main">
        <div class="admin-main layui-anim layui-anim-upbit">
            <fieldset class="layui-elem-field layui-field-title">
                <legend><?php echo htmlentities($title); ?></legend>
            </fieldset>
            <form class="layui-form layui-form-pane" lay-filter="form">

                <div class="layui-form-item">
                    <label class="layui-form-label">链接名字</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" lay-verify="required" placeholder="<?php echo lang('pleaseEnter'); ?>登录用户名" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        在4到25个字符之间。
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><?php echo lang('url'); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" name="url" placeholder="<?php echo lang('pleaseEnter'); ?>网址"  lay-verify="url" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        必须是https 或者http 开头
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><?php echo lang('email'); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" name="email" lay-verify="email" placeholder="<?php echo lang('pleaseEnter'); ?>邮箱" class="layui-input">
                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><?php echo lang('qq'); ?></label>
                    <div class="layui-input-inline">
                        <input type="text" name="qq" lay-verify="number" value="" placeholder="<?php echo lang('pleaseEnter'); ?><?php echo lang('qq'); ?>" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-inline">
                        <input type="hidden" name="id"  >
                        <button type="button" class="layui-btn" lay-submit="" lay-filter="submit"><?php echo lang('submit'); ?></button>
                        <a href="<?php echo url('index'); ?>" class="layui-btn layui-btn-primary"><?php echo lang('back'); ?></a>
                    </div>
                </div>
            </form>
        </div>

    </div>
</div>

<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form', 'layer','upload'], function () {
        var form = layui.form, layer = layui.layer,$= layui.jquery,upload = layui.upload;
        var info = '';
        info = <?php echo json_encode($info); ?>;
        form.val("form", info);

        form.render();
        form.on('submit(submit)', function (data) {
            loading =layer.load(1, {shade: [0.1,'#fff']});
            $.post("", data.field, function (res) {
                layer.close(loading);
                if (res.code > 0) {
                    layer.msg(res.msg, {time: 1800, icon: 1}, function () {
                        location.href = res.url;
                    });
                } else {
                    layer.msg(res.msg, {time: 1800, icon: 2});
                }
            });
        });

    });
</script>